package com.example.tilitili.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 返回状态枚举
 */
@ToString
@Getter
@AllArgsConstructor
public enum RespBeanEnum {
    //通用状态码
    SUCCESS(200,"success"),
    ERROR(500,"服务端异常"),
    //登录模块5002xx
    SESSION_ERROR(500210,"session不存在或者已经失效"),
    LOGINVO_ERROR(500211,"用户名或者密码错误"),
    MOBILE_ERROR(500212,"手机号码格式错误"),
    BIND_ERROR(500212,"参数校验异常"),
    MOBILE_NOT_EXIST(500213, "手机号码不存在"),
    PASSWORD_UPDATE_FAIL(500214, "密码更新失败"),
    //秒杀模块5005xx
    EMPTY_STOCK(500500,"库存不足"),
    REPEATE_ERROR(500501,"该商品每人限购一件"),
    REQUEST_ILLEGAL(500502,"请求非法，请重新尝试"),
    ERROR_CAPTCHA(500503,"验证码错误，请重新输入"),
    ACCESS_LIMIT_REACHED(500504,"访问过于频繁，请稍后再试"),
    //订单模块5004xx
    ORDER_NOT_EXIST(500400,"订单信息不存在"),
    //注册模块
    MOBILE_EXIST(500310,"此手机号已注册"),
    PASSWORD_ERROR(500311,"两次密码不一致"),
    //秒杀上架模块
    SECKILL_STOCK(500600,"超过商品库存数量！"),
    SECKILL_PRICE(500601,"超过商品原价！！！")
    ;
    private final Integer code;
    private final String message;
}
